<?php
class forumPost
{
    protected $id;
    protected $id_article;
    protected $date;
    protected $user_id;
    protected $subject;
    protected $text;
    public function __construct($id, $id_article, $date, $user_id, $subject, $text)
    {
        $this->id = $id;
        $this->id_article = $id_article;
        $this->date = $date;
        $this->user_id = $user_id;
        $this->subject = $subject;
        $this->text = $text;
    }
    public function __toString()
    {        
        $result = sprintf("<div id=\"forumPost\">%s%s%s</div>",
                $this->subject,
                $this->text,
                $this->user_id);
        return $result;
    }
}

?>
